﻿namespace KinonekoSoftware.ArkSpark.Documents.Primitives
{
    public sealed class ParagraphElement : ContentRoot, IArkSparkTextModel
    {
        protected override void OnContentChanged()
        {
            //
            // 内容已经修改
            IsModified = true;
            
            //
            //
            RaiseUpdated(nameof(Length));
        }

        public bool IsModified { get; set; }
        public int  Length     => Content?.Length ?? 0;
    }
}